//
//  GoodsDetailSelectCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/12/15.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "GoodsDetailSelectCell.h"
#import "GoodsSpecListModel.h"
#import "GoodsSpecSubModel.h"
@interface GoodsDetailSelectCell ()

@property (weak, nonatomic) IBOutlet UILabel *leftLabel;
@property (weak, nonatomic) IBOutlet UILabel *middleLabel;
@property (weak, nonatomic) IBOutlet UIView *bottomLineView;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomMargin;
@end

@implementation GoodsDetailSelectCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.leftLabel.font = MYFONT(13);
    self.leftLabel.textColor = darkGray;
    
    self.middleLabel.font = MYFONT(15);
    
    self.bottomLineView.backgroundColor = viewBgGrey;
    
    self.bottomMargin.constant = 0;
    // Initialization code
}

- (void)setModel:(GoodsDetailModel *)model{
    _model = model;
    
    if (_model.spec_list.count > 0) {
        
        self.leftLabel.text = @"已选";
        
             
        self.middleLabel.text = _model.displayStr;
        
        
    } else {
        
        self.middleLabel.text = _model.displayStr;
        
        self.leftLabel.text = @"默认";
    }
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
